/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jkoa.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author fikri
 */
@Embeddable
public class AkademikSubjekPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "id_akademik_subjek")
    private int idAkademikSubjek;
    @Basic(optional = false)
    @Column(name = "id_akademik")
    private int idAkademik;

    public AkademikSubjekPK() {
    }

    public AkademikSubjekPK(int idAkademikSubjek, int idAkademik) {
        this.idAkademikSubjek = idAkademikSubjek;
        this.idAkademik = idAkademik;
    }

    public int getIdAkademikSubjek() {
        return idAkademikSubjek;
    }

    public void setIdAkademikSubjek(int idAkademikSubjek) {
        this.idAkademikSubjek = idAkademikSubjek;
    }

    public int getIdAkademik() {
        return idAkademik;
    }

    public void setIdAkademik(int idAkademik) {
        this.idAkademik = idAkademik;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idAkademikSubjek;
        hash += (int) idAkademik;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AkademikSubjekPK)) {
            return false;
        }
        AkademikSubjekPK other = (AkademikSubjekPK) object;
        if (this.idAkademikSubjek != other.idAkademikSubjek) {
            return false;
        }
        if (this.idAkademik != other.idAkademik) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jkoa.model.AkademikSubjekPK[ idAkademikSubjek=" + idAkademikSubjek + ", idAkademik=" + idAkademik + " ]";
    }
    
}
